package com.heima.search.util;

public class ThreadLocalUtil {
    private static final ThreadLocal USER_ID_THREADLOCAL=new ThreadLocal();

    public static void set(Integer userId){
        USER_ID_THREADLOCAL.set(userId);
    }

    public static Integer get(){
        return (Integer) USER_ID_THREADLOCAL.get();
    }


    public static void remove(){
        USER_ID_THREADLOCAL.remove();
    }


}
